package com.bawei.property.entity

import com.bawei.net.BaseResponse
import com.blankj.utilcode.util.GsonUtils
import org.json.JSONArray
import java.io.Serializable

data class ParkListResultEntity(
    val values: String
): BaseResponse(){
    fun getValues(): List<ParkValue>{
        var list = mutableListOf<ParkValue>()
        var dataArray = JSONArray(values)
        for (i in 0 until dataArray.length()){
            list.add(GsonUtils.fromJson(dataArray[i].toString(), ParkValue::class.java))
        }
        return list
    }
}

data class ParkValue(
    var parkUser: Int = 0,
    var parkId: Int = 0,
    var parkTime: String = "",
    var parkName: String = "",
    var parkEnd: String = "",
    var parkStart: String = "",
    var leftFlag: Boolean = false
):Serializable
